/**
 *
 */
package jp.seraph.jsade.perceptor;

/**
 *
 */
public class GameStatePerceptor implements Perceptor {
    public GameStatePerceptor(GameState aState, double aTimeSpan, String aTeam){
        mState = aState;
        mTimeSpan = aTimeSpan;
        mTeam = aTeam;
    }

    private GameState mState;
    private double mTimeSpan;
    private String mTeam;

    /**
     *
     * @see jp.seraph.jsade.perceptor.Perceptor#accept(jp.seraph.jsade.perceptor.PerceptorVisitor)
     */
    public void accept(PerceptorVisitor aVisitor) {
        aVisitor.visit(this);
    }

    public GameState getState(){
        return mState;
    }

    /**
     * 現在のステートになってから何秒間たったかを取得する
     * @return
     */
    public double getTimeSpan(){
        return mTimeSpan;
    }
    
    public boolean hasTeam(){
	return mTeam != null;
    }
    
    public boolean isLeft(){
	return "left".equals(mTeam);
    }
}